<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <link rel="stylesheet" type="text/css" href="css/styles.css" />

        <script type="text/javascript" src="js/TinyC5-0.7.js"></script>
        <script type="text/javascript" src="js/TinyC5Utils-0.7.js"></script>
        <script type="text/javascript">

            var dbfLogo;

            function load() {
                dbfLogo = new Image();
                dbfLogo.src = Assets.dbfLogo;
                dbfLogo.onload = function(e) { main(); };
            }

            function main() {
                var tinyC5, args, logoImageData;

                // Get imageData
                logoImageData = TinyC5Utils.getImagedataFromImage( dbfLogo );

                tinyC5 = new TinyC5();
                args = {
                    width: dbfLogo.width,
                    height: dbfLogo.height,
                    scale: 1,
                    title: 'Tutorial | TinyC5',
                    container: document.getElementById( 'tinyC5_container' )
                };
                tinyC5.init( args );
                tinyC5.update = function() {
                    var i = 0, pLen = tinyC5.pixels.length;
                    while( pLen-- ) {
                        tinyC5.pixels[ i ] = logoImageData[ i++ ];
                    }
                };
                tinyC5.start();
            }

            var Assets = {
                dbfLogo: "%3D%3D"
            };
        </script>
    </head>
    <body onload="load()">
        <div id="container">
            <!-- This is the DOM element to which the TinyC5 canvas element is appended -->
            <div id="tinyC5_container">
            </div>
        </div>
        <div id="footer">
            Tutorial | Created with <a href="http://www.dbfinteractive.com/forum/index.php?topic=5397.0">TinyC5</a>
        </div>
    </body>
</html>